/* eslint-disable no-undef */
data = ['澳大利亚', '美国', '冰岛', '西藏', '上海', '新疆'];

async function list() {
    let res = await ajaxFn({
        baseUrl:
            'https://service-dmsf9bxc-1251395798.gz.apigw.tencentcs.com/release',
        url: '/api/web/carouselGroup/get',
        method: 'GET',
        data: {
            carouselGroupId: 62,
            projectId: '22',
        },
        headers: {
            'Content-type': 'application/json',
        },
    });
    console.log(res.data.w_carousels);
    let list = res.data.w_carousels;
    let str = '';
    let listContent = document.querySelector('.list-content');
    list.forEach((item, index) => {
        str += `<div class="box">
        <div class="box-small"><img src="${item.url}"></div>
        <span>${data[index]}</span>
    </div>`;
    });
    listContent.innerHTML = str;
}
list();
